//
//  vspConnect.h
//  妙居
//
//  Created by gaogao on 19/07/2017.
//  Copyright © 2017 miotlink. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <GCDAsyncSocket.h>

@protocol vspConnectDelegate <NSObject>

- (void)receiveSocketData:(NSData *)data;
- (void)failAction:(NSError *)err;
- (void)didConnectToHost;

@end


@interface vspConnect : NSObject

//@property(nonatomic,assign)BOOL isIPv4;

@property(nonatomic,weak)id<vspConnectDelegate> delegate;
@property(nonatomic,strong)GCDAsyncSocket *socket;

+ (instancetype)shareInstance;

- (void)getSocket:(NSString *)ip onPort:(int)port;


- (void)closeSocket;

@end
